package com.personal.kotlinmvptest.module

import android.os.Bundle
import android.support.v4.app.Fragment
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.personal.kotlinmvptest.R
import com.personal.kotlinmvptest.entity.Personal

/**
 * @Description
 *
 * @author taodq
 * @Date 2019-08-09.
 */
class MainFragment : Fragment(), MainContract.View {

    private val TAG = "MainFragment"

    private lateinit var mPresenter: MainContract.Presenter
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        mPresenter.start()
        return inflater.inflate(R.layout.fragment_main,container,false)
    }

    override fun showPersonal(personal: Personal) {
        Log.e(TAG, personal.toString())
    }

    override fun setPresenter(presenter: MainContract.Presenter) {
        this.mPresenter = presenter
    }

}